#include "calclient.hpp"
#include <memory>

using namespace std;

static void usage(string proc)
{
    std::cerr << "\nusage:\n\t" << proc << " serverip serverport\n\n";
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        usage(argv[0]);
        exit(1);
    }
    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);

    unique_ptr<CalClient> tcpcalclient(new CalClient(serverip, serverport));
    tcpcalclient->initClient();
    tcpcalclient->start();

    return 0;
}